#!/bin/bash
set -e
# root
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/wine
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/wineserver
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/dnscrypt-proxy
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/caddy
sudo setcap cap_net_raw+ep /usr/bin/iftop
sudo setcap 'cap_net_admin+eip' /usr/bin/iotop
sudo setcap cap_net_admin,cap_net_bind_service,CAP_NET_RAW=+ep $config_path/phantomsocks/phantomsocks
sudo trust anchor --store $config_path/steamcommunity/steamcommunityCA.pem
certutil -d "sql:$HOME/.pki/nssdb" -A -i $config_path/steamcommunity/steamcommunityCA.pem -n "SteamTools CA" -t C,,
cat $config_path/steamcommunity/hosts.txt | sudo tee -a /etc/hosts
# systemctl enable --now cronie.service
